<template>
  <BasicDrawer v-bind="$attrs" @register="registerDrawer" destroyOnClose title="会员卡权益" width="55%" :showFooter="false">
    <CardServerIndex ref="cardServerIndex"></CardServerIndex>
  </BasicDrawer>
</template>
<script lang="ts" setup>
import { getCurrentInstance } from 'vue';
import { BasicDrawer, useDrawerInner } from '@apps/antd-admin/src/components/drawer';
import CardServerIndex from '../../cardserver/index.vue';

const ctx: any = getCurrentInstance();

const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
  let record = data.record;
  ctx.refs['cardServerIndex'].setSearchInfoProps(record.userGoodsId);
});
</script>
